package com.gulimall.ware.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gulimall.ware.entity.WareSkuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 商品库存
 *
 * @author kkk
 * @email 2017809755@qq.com
 * @date 2022-05-17 22:04:35
 */
@Mapper
public interface WareSkuDao extends BaseMapper<WareSkuEntity> {

    void saveWareStock(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("skuNum") Integer skuNum);

    Integer judgingStock(@Param("wareId") Long wareId, @Param("skuId") Long skuId);

    void updateSkuStock(@Param("wareId") Long wareId, @Param("skuId") Long skuId, @Param("count") Integer count);

    void ubLockOrder(@Param("wareId") Long wareId, @Param("skuId") Long skuId, @Param("skuNum") Integer skuNum);
}
